package com.zte.cl.utils;


public class HtmlunitUtil {
	/*private static WebClient getDefaultWebClient() {
		// 创建一个可执行js,css,ajax的多功能WebClient
		WebClient wc = new WebClient(BrowserVersion.INTERNET_EXPLORER_11);
		//wc.addRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
		wc.getOptions().setJavaScriptEnabled(false);
		wc.getOptions().setCssEnabled(false);
		wc.getOptions().setThrowExceptionOnScriptError(false);
		wc.getOptions().setThrowExceptionOnFailingStatusCode(false);
		// wc.setJavaScriptEngine(new JavaScriptEngine(wc));
		wc.waitForBackgroundJavaScript(600 * 1000);
		wc.getOptions().setThrowExceptionOnScriptError(false);
		//wc.setAjaxController(new NicelyResynchronizingAjaxController());// 设置ajax代理
		return wc;
	}

	public static HtmlPage getHtmlPage(String url) throws IOException {
		WebClient wc = getDefaultWebClient();
		URL loginUrl = new URL(url);
		return (HtmlPage) wc.getPage(loginUrl);
	}*/
}
